/*
 * Copyright 2022 The Open Islands Authors. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.openislands.oi.pojo.dto;

import org.openislands.oi.constant.AlgorithmType;
import org.openislands.oi.constant.OperatorType;
import org.openislands.oi.pojo.base.OperatorCommonPOJO;
import java.io.Serializable;
import java.util.Map;

public class OperatorDTO extends OperatorCommonPOJO implements Serializable {
    private String driver;
    private String entrypoint;
    private String sourceUri;
    private Map<String, String>  env;
    private String note;
    public OperatorDTO(){

    }
    public OperatorDTO(String module){
        String[] items = module.split("\\.");
        this.type = OperatorType.valueOf(items[0].toUpperCase());
        this.algorithm = AlgorithmType.valueOf(items[1].toUpperCase());
    }

    public String getEntrypoint() {
        return entrypoint;
    }

    public void setEntrypoint(String entrypoint) {
        this.entrypoint = entrypoint;
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    public String getSourceUri() {
        return sourceUri;
    }

    public void setSourceUri(String sourceUri) {
        this.sourceUri = sourceUri;
    }

    public Map<String, String> getEnv() {
        return env;
    }

    public void setEnv(Map<String, String> env) {
        this.env = env;
    }

    public String getDriver() {
        return driver;
    }

    public void setDriver(String driver) {
        this.driver = driver;
    }
}